A programmable controller (hereinafter, referred to as “PLC”) used in factory automation (hereinafter, referred to as “FA”) executes control in such a manner that it is supplied with ON/OFF information from input devices such as switches, sensors, and the like, executes a logical operation using a sequence program (also referred to as user's program) written in a ladder language and the like, and outputs the signals of ON/OFF information to output devices such as relays, valves, actuators, and the like according to a result of the arithmetic operation.
Incidentally, as a connection mode between the PLC and the input and output devices, the input and output devices may be directly connected to the PLC or may be connected to the PLC through a network. When a network system, in which the input and output devices are connected to the PLC through the network, is constructed, the ON/OFF information is transmitted and received through the network. At this time, the information is ordinarily transmitted using a master/slave system in which the PLC acts as a master and the input and output devices act as slaves.
In contrast, recently, a failsafe (safety) system is being introduced also in the control executed by the PLC. That is, a safety function is built in not only the PLC and the respective devices but also in the network. The safety function is a function for executing an output after a safe state is confirmed. In a safety system, failsafe function is executed when the network system is placed in a dangerous state by that an emergency stop switch is depressed, sensors such as a light curtain and the like detect an incoming person (a part of a body), and the like so that the safety system is set to a safe side and the operation thereof is stopped. In other words, the safety system is a system that issues an output only when the safe state is confirmed by the safety function and operates a machine. Therefore, when the safe state cannot be confirmed, the machine is stopped.
When a slave receives a request from, for example, the PLC (master), the slave can return its state as a response, thereby the PLC can obtain the state of the slave connected to the network.
Incidentally, when a dangerous state occurs in the safety network system, it is preferable to switch the system to a safe side as soon as possible and to stop the system. However, an increase in the number of safety devices connected to the safety network inevitably increases a communication cycle time because safety informations as many as the safety devices are transmitted in one communication cycle. Accordingly, even if safety information (danger information) can be transmitted at the beginning of a communication cycle, there passes a period of time corresponding to a communication cycle from previous transmission to present transmission. Thus, the failsafe function cannot be executed by promptly notifying the occurrence of the dangerous state. When the safety information (danger information) is transmitted at the end of the communication cycle, the execution of the failsafe function is more delayed.
Further, although the safety information (danger information) can be transmitted when the safety devices and the safety slaves operate normally, there is a case that the safety information cannot be transmitted to the safety PLC because an apparatus itself fails or the network is in an abnormal state. In this case, the failsafe function must be also executed determining that the abnormal state occurs.
In this case, when there is a safety slave (safety device) that sends no response even if a preset receiving time has passed after a request is transmitted thereto by, for example, a simultaneous transmissive communication (timeout), it is possible to determine that the safety slave is abnormal. Accordingly, a receiving time from which the timeout occurs must be set at least longer than a communication cycle time in a normal state, and thus when the communication cycle time increases as described above, a period of time necessary to determine whether or not the network is abnormal also increases, which prevents the prompt execution of a processing when the abnormal state occurs.
Note that when a plurality of safety devices are connected to one safety slave (terminal), since the safety slave collects safety informations from the plurality of safety devices and transmits the safety informations of all the safety devices connected thereto at a time, from the problem described above arises.
An object of the present invention is to provide a safety network system, a safety slave, and a safety controller that can promptly transmit whether or not safety devices (safety device) are safe to a master (safety controller) and other devices, promptly execute the failsafe function when an abnormal (dangerous) state occurs, and further confirm the detailed information of an overall system and promptly specify a malfunction when a dangerous portion is specified or the system is debagged.